import Vue from "vue";
import { mapGetters, mapMutations } from "vuex";
const globalMixin = {
  // eslint-disable-next-line
  install(Vue) {
    Vue.mixin({
      computed: {
        ...mapGetters({
          token: "token",
          theme: "theme",
          lang: "lang",
          screenHeight: "screenHeight"
        })
      },
      methods: {
        ...mapMutations([
          "SET_TOKEN",
          "SET_THEME",
          "SET_LANG",
          "SET_SCREEN_HEIGHT"
        ])
      }
    });
  }
};

Vue.use(globalMixin);

export default globalMixin;
